package com.marvels.financial.loan.dao;
import org.apache.ibatis.annotations.Param;

import com.github.pagehelper.Page;
import com.marvels.financial.loan.dto.McfeWithholdCompensatoryDto;
import com.marvels.financial.loan.dto.ReplacePaymentApplyInfo;
import com.marvels.financial.loan.dto.ReplacePaymentAuditStatistics;
import com.marvels.financial.loan.dto.ReplacePaymentConditionDto;

public interface McfeWithholdCompensatoryDao {
	/**
	 * 插入代还款/代偿审核信息
	 * @param record
	 * @return
	 */
	public int insertSelective(McfeWithholdCompensatoryDto record);
	
	
	/**
	 * 代还款信息统计
	 * @return
	 */
	public  ReplacePaymentAuditStatistics selectStatistics(ReplacePaymentConditionDto replacePaymentConditionDt);
	
	
	/**
	 * 查询通过数据(当天)
	 * @return
	 */
	public  Page<ReplacePaymentApplyInfo> selectAdoptData(ReplacePaymentConditionDto replacePaymentConditionDto);
	
	
	/**
	 * 查询拒绝数据
	 * @return
	 */
	public Page<ReplacePaymentApplyInfo> selectRefuseData(ReplacePaymentConditionDto replacePaymentConditionDto);
	
	
	/**
	 * 查询拒绝数据
	 * @return
	 */
	public Page<ReplacePaymentApplyInfo> selectAllData(ReplacePaymentConditionDto replacePaymentConditionDto);
	
	/**
	 * 查询统计金额
	 * @param replacePaymentConditionDto
	 * @return
	 */
	public ReplacePaymentApplyInfo selectAllAmountStatic(ReplacePaymentConditionDto replacePaymentConditionDto);
	
	/**
	 * 根据loanId查询代还款/代偿审核信息
	 * @param loanId
	 * @param payType还款类型: 1-代还款;2-代提前结清;3-代偿;4-代偿提前结清
	 * @param custCardNo  身份证
	 * @return
	 */
	public McfeWithholdCompensatoryDto selectCompensatory(@Param("loanId") String loanId,@Param("payType") String payType,@Param("custCardNo") String custCardNo,@Param("withholdCategory") String withholdCategory);
	
	
	/**
	 * 更新代还款/代偿审核信息记录
	 * @param record
	 * @return
	 */
	public int updateById(McfeWithholdCompensatoryDto record);
	
	/**
	 * 通过id查询记录
	 * @param id
	 * @return
	 */
	public McfeWithholdCompensatoryDto selectById(@Param("id") long id);
}